#include <iostream>


// 判断机器大小端
int main()
{
    int num = 0x12345678;
    char* tmp = (char*)&num;
    if(*tmp == 0x78) std::cout << "小端" << std::endl;
    if(*tmp == 0x12) std::cout << "大端" << std::endl;
    return 0;
}